package com.yongqi.duocai.service;

import com.yongqi.duocai.entity.ShoppingCart;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yongqi.duocai.entity.result.ChooseShoppingInfoResult;
import com.yongqi.duocai.entity.result.ShoppingCarResult;
import com.yongqi.duocai.mapper.ShoppingCartMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 夏亮辉
 * @since 2021-06-19
 */
@Service
public interface ShoppingCartService extends IService<ShoppingCart> {


    List<ShoppingCarResult> queryInfo(Integer id);

    /**
     * 根据 id 查询 选中的商品信息
     * @param ids
     * @return
     */
    List<ChooseShoppingInfoResult> queryChoose(Integer[] ids);


    List<ChooseShoppingInfoResult> queryGoods(Integer userId, Integer[] ids);

    /**
     * 按条件查询
     * @param userId
     * @param shoppingCart
     * @return
     */
    ShoppingCart queryOneByCondition(Integer userId, ShoppingCart shoppingCart);
}
